using System.Threading.Tasks;
using System.Collections.Generic;
using JGSY.CMS.LowCode.Platform.Application.DTOs;

namespace JGSY.CMS.LowCode.Platform.Application.Interfaces
{
    /// <summary>
    /// 第三方社交登录应用服务接口。
    /// 提供各种第三方平台的社交登录、绑定、解绑等功能接口定义。
    /// </summary>
    public interface ISocialAuthAppService
    {
        /// <summary>
        /// 获取第三方社交登录配置
        /// </summary>
        /// <returns>第三方登录配置信息</returns>
        Task<SocialConfigDto> GetSocialConfigAsync();
        
        /// <summary>
        /// GitHub登录回调处理
        /// </summary>
        /// <param name="code">授权码</param>
        /// <param name="state">状态参数</param>
        /// <returns>处理结果</returns>
        Task<string> GithubCallbackAsync(string code, string state);
        
        /// <summary>
        /// Google登录回调处理
        /// </summary>
        /// <param name="code">授权码</param>
        /// <param name="state">状态参数</param>
        /// <returns>处理结果</returns>
        Task<string> GoogleCallbackAsync(string code, string state);
        
        /// <summary>
        /// 微博登录
        /// </summary>
        /// <param name="code">授权码</param>
        /// <returns>登录结果</returns>
        Task<string> LoginWithWeiboAsync(string code);
        
        /// <summary>
        /// 钉钉登录
        /// </summary>
        /// <param name="code">授权码</param>
        /// <returns>登录结果</returns>
        Task<string> LoginWithDingTalkAsync(string code);
        
        /// <summary>
        /// 绑定第三方账号
        /// </summary>
        /// <param name="provider">第三方平台提供商</param>
        /// <param name="code">授权码</param>
        /// <returns>绑定结果</returns>
        Task<string> BindAsync(string provider, string code);
        
        /// <summary>
        /// 解绑第三方账号
        /// </summary>
        /// <param name="provider">第三方平台提供商</param>
        /// <returns>解绑结果</returns>
        Task<string> UnbindAsync(string provider);
    }
}